var load_config_file = function() {
    files = document.getElementById("upload-config").files

    var reader = new FileReader()
    var target = e('.debug-range')
    reader.onload = function() {
        target.innerHTML = ""
        var text = reader.result
        log("obs", text)
        var obs = JSON.parse(text)
        for (var i = 0; i < obs.length; i++) {
            var labelVar = obs[i]
            var labelName = labelVar["labelName"]
            var dataValue = labelVar["dataValue"]
            var newLabelHTML = render_template(labelName, dataValue)
            target.innerHTML += newLabelHTML
        }
    }
    reader.readAsText(files[0])

}

var render_template = function(labelName, dataValue) {
    var template = `
    <label>
        <input class="gua-auto-slider" type="range" 
                value=""
                data-value="${dataValue}"
        >
        ${labelName}: <span class="gua-label"></span>
    </label>
    `
    return template
}